
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Админ-панель T4</title>

        <link href="{{T4.url}}/include/bootstrap/css/bootstrap.css" rel="stylesheet">
        <style type="text/css">
            body {
                padding-top: 60px;
                padding-bottom: 40px;
            }
            .sidebar-nav {
                padding: 9px 0;
            }
        </style>
        <link href="{{T4.url}}/include/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->

        <script type="text/javascript" src="{{T4.url}}/include/jquery/jquery.min.js"></script>

    </head>

    <body>

        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container-fluid">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar">111</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </a>

                    <a class="brand" href="/admin/">Админ-панель T4</a>

                    <div class="nav-collapse">
                        <ul class="nav">
                            <li class="active"><a href="/admin/">Начало</a></li>
                            {% for app in menu %}
							{% if app.menu %}
                            <li class="dropdown">
                                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                                    {{ app.title }}
                                    <b class="caret"></b>
                                </a>
                                <ul class="dropdown-menu">
                                    <li><a href="{{ app.url }}"><strong>{{ app.title }}</strong></a></li>
                                    <li class="divider"></li>
									{% for el in app.menu %}
                                    <li><a href="{{ el.url }}">{{ el.title }}</a></li>
									{% endfor %}
                                </ul>
                            </li>
							{% else %}
							<li><a href="{{ app.url }}">{{ app.title }}</a></li>
							{% endif %}
                            {% endfor %}
                        </ul>
                        <p class="navbar-text pull-right">Logged in as <a href="#">username</a></p>
                    </div><!--/.nav-collapse -->
                </div>
            </div>
        </div>

        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span2">
                    <div class="well sidebar-nav">
                        <ul class="nav nav-list">
							{% for app in menu %}
                            <li class="nav-header"><a href="{{ app.url }}">{{ app.title }}</a></li>
							
							{% if app.menu %}
							{% for el in app.menu %}
							<li><a href="{{ el.url }}">{{ el.title }}</a></li>
							{% endfor %}
							{% endif %}
							
							{% endfor %}
                        </ul>
                    </div><!--/.well -->
                </div><!--/span-->
				
                <div class="span10">
					
					{% if errors %}
					{% for error in errors %}
						<section class="alert alert-error">{{ error }}</section>
					{% endfor %}
					{% endif %}

                    <section class="well">
                        <div>{{content|raw}}</div>
                    </section>
					
					{% if return %}<section class="alert alert-success"><a href="{{ return }}">вернуться</a></section>{% endif %}
					
                </div><!--/span-->
				
            </div><!--/row-->

            <hr>

            <footer>
                <p>&copy; TO4KA Programming Team</p>
            </footer>

        </div>

        <script src="{{T4.url}}/include/jquery/jquery.min.js"></script>
        <script src="{{T4.url}}/include/bootstrap/js/bootstrap-transition.js"></script>
        <script src="{{T4.url}}/include/bootstrap/js/bootstrap-alert.js"></script>
        <script src="{{T4.url}}/include/bootstrap/js/bootstrap-modal.js"></script>
        <script src="{{T4.url}}/include/bootstrap/js/bootstrap-dropdown.js"></script>
        <script src="{{T4.url}}/include/bootstrap/js/bootstrap-scrollspy.js"></script>
        <script src="{{T4.url}}/include/bootstrap/js/bootstrap-tab.js"></script>
        <script src="{{T4.url}}/include/bootstrap/js/bootstrap-tooltip.js"></script>
        <script src="{{T4.url}}/include/bootstrap/js/bootstrap-popover.js"></script>
        <script src="{{T4.url}}/include/bootstrap/js/bootstrap-button.js"></script>
        <script src="{{T4.url}}/include/bootstrap/js/bootstrap-collapse.js"></script>
        <script src="{{T4.url}}/include/bootstrap/js/bootstrap-carousel.js"></script>
        <script src="{{T4.url}}/include/bootstrap/js/bootstrap-typeahead.js"></script>

    </body>
</html>